from datetime import datetime, timezone, timedelta

def getDate():
    # 创建北京时区 (UTC+8)
    beijing_tz = timezone(timedelta(hours=8))

    # 获取当前UTC时间并转换为北京时间
    now_utc = datetime.utcnow().replace(tzinfo=timezone.utc)
    now_beijing = now_utc.astimezone(beijing_tz)

    # 格式化为YYYYMMDD
    formatted_date = now_beijing.strftime("%Y%m%d")

    return formatted_date
